package com.uum.blog.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.uum.common.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author Tsang_yc
 * @since 2022-01-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Blog对象", description = "")
@JsonInclude(value = JsonInclude.Include.NON_EMPTY)
public class Blog extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "用戶ID")
    private Long userId;

    @ApiModelProperty(value = "作者名字")
    private String author;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "分类id")
    @TableField(updateStrategy = FieldStrategy.IGNORED) //ignored：“忽略判断”，所有字段都更新和插入。可以插入空值
    private Long categoryId;

    @ApiModelProperty(value = "是否发布 0草稿 1已发布 2下架")
    private Integer isRelease;

    @ApiModelProperty(value = "是否置顶 0 否 1是")
    private Integer isTop;

    @ApiModelProperty(value = "是否开启评论 0否 1是")
    private Integer isComment;

    @ApiModelProperty(value = "逻辑删除 0未删除 1删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "文章评论的数量")
    private Integer commentCount;

    @ApiModelProperty(value = " 点击文章的数量")
    private Integer clickNum;

}
